package bmf.util;

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.URL;

public class HttpUtil {

	public static String get(String pUrl) {
		StringBuilder html = new StringBuilder();
		
		try {
			
			URL url = new URL(pUrl);
			BufferedReader reader = new BufferedReader(new InputStreamReader(url.openStream()));

			String line = null;
			while ((line = reader.readLine()) != null) {
				html.append(line);
			}
			reader.close();

		} catch (Exception e) {
			e.printStackTrace();
			// TODO tratar essa excecao
		}
		return html.toString();
	}

}
